package com.zjhb.common.enumutil;

public enum UserStatus {
	Use("1", "启用"), Limit("0", "禁用");

	private String key;
	private String value;

	private UserStatus(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static UserStatus parse(String key) {
		UserStatus [] areas=UserStatus.values();
		for(UserStatus a:areas){
			if(a.getKey().equals(key)){
				return a;
			}
		}
        return null;
	}

	public static UserStatus parseValue(String value) {
		UserStatus [] areas=UserStatus.values();
		for(UserStatus a:areas){
			if(a.getValue().equals(value)){
				return a;
			}
		}
        return null;
	}



}
